package threadpool;


import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


/**
 * @Classname FixedThreadPoolTest
 * @Description 演示newFixedThreadPool
 * @Date 2024/1/7 19:32
 * @Author zhuzhenguo
 */
public class FixedThreadPoolTest {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(4);
        for (int i = 0; i < 1000; i++) {
            executorService.execute(new Task());
        }
    }
}
